import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'zolon_printer_method_channel.dart';

abstract class ZolonPrinterPlatform extends PlatformInterface {
  /// Constructs a ZolonPrinterPlatform.
  ZolonPrinterPlatform() : super(token: _token);

  static final Object _token = Object();

  static ZolonPrinterPlatform _instance = MethodChannelZolonPrinter();

  /// The default instance of [ZolonPrinterPlatform] to use.
  ///
  /// Defaults to [MethodChannelZolonPrinter].
  static ZolonPrinterPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [ZolonPrinterPlatform] when
  /// they register themselves.
  static set instance(ZolonPrinterPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<void> configM9200Printer(int printMode, int labelPaperWidth, int labelPaperHeight) async {
    throw UnimplementedError('configM9200Printer() has not been implemented.');
  }

  Future<void> m9200PrintLabel(String labelText, int paperWidth, int paperHeight) async {
    throw UnimplementedError('m9200PrintLabel() has not been implemented.');
  }

  Future<void> m9200PrintTicket({
    required String orderJSON,
    required String shopJSON,
    required String printerJSON,
    required String ticketType,
    bool isDebugMode = false
  }) async {
    throw UnimplementedError('m9200PrintTicket() has not been implemented.');
  }
}
